#!/bin/bash
OS=`uname -m`;
host=`hostname`;
ip=`cat /etc/VpsPackdir/ip`;
_ons=$(ps -x | grep sshd | grep -v root | grep priv | wc -l)
[[ -e /etc/openvpn/openvpn-status.log ]] && _onop=$(grep -c "10.8.0" /etc/openvpn/openvpn-status.log) || _onop="0"
[[ -e /etc/default/dropbear ]] && _drp=$(ps aux | grep dropbear | grep -v grep | wc -l) _ondrp=$(($_drp - 1)) || _ondrp="0"
_onli=$(($_ons + $_onop + $_ondrp))
_onlin=$(printf '%-5s' "$_onli")
_tuser=$(awk -F: '$3>=1000 {print $1}' /etc/passwd | grep -v nobody | wc -l);
squidports=`netstat -tunlp | grep squid | grep -vE 'udp' | awk '{print substr($4,4); }' > /tmp/squid.txt && echo | cat /tmp/squid.txt | tr '\n' ' ' > /etc/VpsPackdir/squidports.txt && cat /etc/VpsPackdir/squidports.txt`;
sslports=`netstat -tunlp | grep stunnel4 | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/ssl.txt && echo | cat /tmp/ssl.txt | tr '\n' ' ' > /etc/VpsPackdir/sslports.txt && cat /etc/VpsPackdir/sslports.txt`;
sshports=`netstat -tunlp | grep sshd | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/ssh.txt && echo | cat /tmp/ssh.txt | tr '\n' ' ' > /etc/VpsPackdir/sshports.txt && cat /etc/VpsPackdir/sshports.txt`;
dantedports=`netstat -tunlp | grep danted | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/danted.txt && echo | cat /tmp/danted.txt | tr '\n' ' ' > /etc/VpsPackdir/dantedports.txt && cat /etc/VpsPackdir/dantedports.txt`;
sockdports=`netstat -tunlp | grep sockd | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/sockd.txt && echo | cat /tmp/sockd.txt | tr '\n' ' ' > /etc/VpsPackdir/sockdports.txt && cat /etc/VpsPackdir/sockdports.txt`;
microports=`netstat -tunlp | grep microsocks | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/micro.txt && echo | cat /tmp/micro.txt | tr '\n' ' ' > /etc/VpsPackdir/microports.txt && cat /etc/VpsPackdir/microports.txt`;
dropbearports=`netstat -tunlp | grep dropbear | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/dropbear.txt && echo | cat /tmp/dropbear.txt | tr '\n' ' ' > /etc/VpsPackdir/dropbearports.txt && cat /etc/VpsPackdir/dropbearports.txt`;
pythonports=`netstat -tunlp | grep python | grep -vE '127.0.0.1' | awk '{print substr($4,9); }' > /tmp/python.txt && echo | cat /tmp/python.txt | tr '\n' ' ' > /etc/VpsPackdir/pythonports.txt && cat /etc/VpsPackdir/pythonports.txt`;
badvpnports=`netstat -tunlp | grep badvpn-udpg | grep tcp | awk '{print substr($4,11); }' > /tmp/badvpn.txt && echo | cat /tmp/badvpn.txt | tr '\n' ' ' > /etc/VpsPackdir/badvpnports.txt && cat /etc/VpsPackdir/badvpnports.txt`;
openvpnports=`netstat -tunlp | grep openvpn | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/openvpn.txt && echo | cat /tmp/openvpn.txt | tr '\n' ' ' > /etc/VpsPackdir/openvpnports.txt && cat /etc/VpsPackdir/openvpnports.txt`;
nginxports=`netstat -tunlp | grep nginx | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/nginx.txt && echo | cat /tmp/nginx.txt | tr '\n' ' ' > /etc/VpsPackdir/nginxports.txt && cat /etc/VpsPackdir/nginxports.txt`;
apacheports=`netstat -tunlp | grep apache2 | awk '{print substr($4,4); }' > /tmp/apache.txt && echo | cat /tmp/apache.txt | tr '\n' ' ' > /etc/VpsPackdir/apacheports.txt && cat /etc/VpsPackdir/apacheports.txt`;
obfsports=`netstat -tunlp | grep obfs | grep 0.0.0.0: | awk '{print substr($4,9); }' > /tmp/obfs.txt && echo | cat /tmp/obfs.txt | tr '\n' ' ' > /etc/VpsPackdir/obfsports.txt && cat /etc/VpsPackdir/obfsports.txt`;
trojanports=`lsof -V -i tcp -P -n | grep -v "ESTABLISHED" |grep -v "COMMAND" | grep "LISTEN" | grep trojan | awk '{print substr($9,3); }' > /tmp/trojan.txt && echo | cat /tmp/trojan.txt | tr '\n' ' ' > /etc/VpsPackdir/trojanports.txt && cat /etc/VpsPackdir/trojanports.txt`;
v2rayports=`netstat -tunlp | grep v2ray | grep LISTEN | grep -vE '127.0.0.1' | awk '{print substr($4,4); }' > /tmp/v2.txt && echo | cat /tmp/v2.txt | tr '\n' ' ' > /etc/VpsPackdir/v2ports.txt && cat /etc/VpsPackdir/v2ports.txt`;
cloakports=`netstat -tunlp | grep ck-server | grep LISTEN | grep -vE '127.0.0.1' | awk '{print substr($4,4); }' > /tmp/cloak.txt && echo | cat /tmp/cloak.txt | tr '\n' ' ' > /etc/VpsPackdir/cloakports.txt && cat /etc/VpsPackdir/cloakports.txt`;
shadowrports=`netstat -tunlp | grep python | grep ::: | awk '{print substr($4,4); }' > /tmp/shadowr.txt && echo | cat /tmp/shadowr.txt | tr '\n' ' ' > /etc/VpsPackdir/shadowrports.txt && cat /etc/VpsPackdir/shadowrports.txt`;
psiports=`netstat -tunlp | grep psiphond | grep 0.0.0.0: | awk '{print substr($4,17); }' > /tmp/psi.txt && echo | cat /tmp/psi.txt | tr '\n' ' ' > /etc/VpsPackdir/psiports.txt && cat /etc/VpsPackdir/psiports.txt`;
droplim=`if ps -aux | grep SCREEN | grep droplimit.sh 1> /dev/null 2> /dev/null; then
echo -e "ON"
else
echo -e "OFF"
fi`;
xclash=`if netstat -tunlp | grep clash 1> /dev/null 2> /dev/null; then
echo -e "ON"
else
echo -e "OFF"
fi`;
distribution=`( lsb_release -ds || cat /etc/*release || uname -om ) 2>/dev/null | head -n1`;
os_version=$(awk '/DISTRIB_RELEASE=/' /etc/*-release | sed 's/DISTRIB_RELEASE=//' | sed 's/[.]0/./');
memorialibre=`awk '/^Mem/ {printf($4);}' <(free -m)`;
memoriauso=`awk '/^Mem/ {printf($3);}' <(free -m)`;
memoriatotal=`awk '/^Mem/ {printf($2);}' <(free -m)`;
memoriacache=`awk '/^Mem/ {printf($6);}' <(free -m)`;
memoriacore=`printf '%-1s' "$(grep -c cpu[0-9] /proc/stat)"`;
processor=$(cat /proc/cpuinfo | grep "model name" | uniq | awk -F ":" '{print $2}')
if [ $(id -u) -eq 0 ]
then
clear
else
echo -e "Ejecute el script como usuario \033[1;32mroot\033[0m"
exit
fi
if [ -d /etc/VpsPackdir ]
then
true
else
mkdir /etc/VpsPackdir
fi
if [ -d /etc/VpsPackdir/senha ]
then
true
else
mkdir /etc/VpsPackdir/senha
fi
if [ -d /etc/VpsPackdir/limite ]
then
true
else
mkdir /etc/VpsPackdir/limite
fi
function configurarsquid(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ☬ VPSPack v. $vpspackversion ☬     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────────────────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist: $distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP Publica VPS:\033[1;32m$ip \033[0m"
echo -e "\033[1;37m › Hostname VPS:\033[1;32m$host \033[0m"
echo -e "\033[1;37m › M: $memoriatotal MB ›Uso: $memoriauso MB ›Libre: $memorialibre MB\033[0m"
echo -e "\033[1;37m › P:$processor\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────────────────────────────\033[1;33m"
echo -e "\033[1;31mInstalando SSH/Squid VPSPack $vpspackversion!\033[0m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m]   › Ubuntu 14 \033[1;33m
[\033[1;32m2\033[1;33m]   › Ubuntu 16 \033[1;33m
[\033[1;32m3\033[1;33m]   › Ubuntu 18 \033[1;33m
[\033[1;32m4\033[1;33m]   › Ubuntu 19 \033[1;33m
[\033[1;32m5\033[1;33m]   › Ubuntu 20 \033[1;33m
[\033[1;32m6\033[1;33m]   › Debian 7 \033[1;33m
[\033[1;32m7\033[1;33m]   › Debian 8 \033[1;33m
[\033[1;32m8\033[1;33m]   › Debian 9 \033[1;33m
[\033[1;32m9\033[1;33m]   › Debian 10 \033[1;33m
[\033[1;32m10\033[1;33m]   › Centos 7 \033[1;33m
[\033[1;32m11\033[1;33m]   › Centos 8 \033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR                 \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
squbuntu1;;
2)
squbuntu2;;
3)
squbuntu2;;
4)
squbuntu2;;
5)
squbuntu2;;
6)
sqdebian1;;
7)
sqdebian2;;
8)
sqdebian2;;
9)
sqdebian2;;
10)
sqcentos1;;
11)
sqcentos1;;
0)
vpspack;;
esac
}
function squbuntu1(){
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "Instalando Servicio Proxy Squid"
echo -e "\033[1;37mConfigurando, Espere...\033[0m"
apt-get remove -y squid3 1> /dev/null 2> /dev/null
apt-get purge -y squid3 1> /dev/null 2> /dev/null
service squid3 stop 1> /dev/null 2> /dev/null
apt-get install -y squid3 1> /dev/null 2> /dev/null
service squid3 stop 1> /dev/null 2> /dev/null
rm /etc/squid3/squid.conf 1> /dev/null 2> /dev/null
echo -e "⎇⇥ Escriba un puerto para Squid"
read -p ": " psquid
if lsof -Pi :$psquid -sTCP:LISTEN -t >/dev/null ; then
echo "Ya esta en uso ese puerto"
else
echo "acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl SSH dst $ip-$ip/255.255.255.255
http_access allow SSH
http_access allow manager localhost
http_access deny manager
http_access allow localhost
http_port $psquid
http_access deny all
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
visible_hostname VpsPack" >> /etc/squid3/squid.conf
service squid3 restart 1> /dev/null 2> /dev/null
echo -e "⎇⇥ Instalacion Finalizada"
fi
echo -e "\033[1;33m › PRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack
}
function squbuntu2(){
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "Instalando Servicio Proxy Squid"
echo -e "\033[1;37mConfigurando, Espere...\033[0m"
apt-get remove -y squid 1> /dev/null 2> /dev/null
apt-get purge -y squid 1> /dev/null 2> /dev/null
service squid stop 1> /dev/null 2> /dev/null
apt-get install -y squid 1> /dev/null 2> /dev/null
service squid stop 1> /dev/null 2> /dev/null
rm /etc/squid/squid.conf 1> /dev/null 2> /dev/null
echo -e "⎇⇥ Escriba un puerto para Squid"
read -p ": " psquid
if lsof -Pi :$psquid -sTCP:LISTEN -t >/dev/null ; then
echo "Ya esta en uso ese puerto"
else
echo "acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl SSH dst $ip-$ip/255.255.255.255
http_access allow SSH
http_access allow manager localhost
http_access deny manager
http_access allow localhost
http_port $psquid
http_access deny all
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
visible_hostname VpsPack" >> /etc/squid/squid.conf
service squid restart 1> /dev/null 2> /dev/null
echo -e "⎇⇥ Instalacion Finalizada"
fi
echo -e "\033[1;33m › PRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack
}
function sqdebian1(){
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "Instalando Servicio Proxy Squid"
echo -e "\033[1;37mConfigurando, Espere...\033[0m"
apt-get remove -y squid3 1> /dev/null 2> /dev/null
apt-get purge -y squid3 1> /dev/null 2> /dev/null
service squid3 stop 1> /dev/null 2> /dev/null
apt-get install -y squid3 1> /dev/null 2> /dev/null
service squid3 stop 1> /dev/null 2> /dev/null
rm /etc/squid3/squid.conf 1> /dev/null 2> /dev/null
echo -e "⎇⇥ Escriba un puerto para Squid"
read -p ": " psquid
if lsof -Pi :$psquid -sTCP:LISTEN -t >/dev/null ; then
echo "Ya esta en uso ese puerto"
else
echo "acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl SSH dst $ip-$ip/255.255.255.255
http_access allow SSH
http_access allow manager localhost
http_access deny manager
http_access allow localhost
http_port $psquid
http_access deny all
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
visible_hostname VpsPack" >> /etc/squid3/squid.conf
service squid3 restart 1> /dev/null 2> /dev/null
echo -e "⎇⇥ Instalacion Finalizada"
fi
echo -e "\033[1;33m › PRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack
}
function sqdebian2(){
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "Instalando Servicio Proxy Squid"
echo -e "\033[1;37mConfigurando, Espere...\033[0m"
apt-get remove -y squid 1> /dev/null 2> /dev/null
apt-get purge -y squid 1> /dev/null 2> /dev/null
service squid stop 1> /dev/null 2> /dev/null
apt-get install -y squid 1> /dev/null 2> /dev/null
service squid stop 1> /dev/null 2> /dev/null
rm /etc/squid/squid.conf 1> /dev/null 2> /dev/null
echo -e "⎇⇥ Escriba un puerto para Squid"
read -p ": " psquid
if lsof -Pi :$psquid -sTCP:LISTEN -t >/dev/null ; then
echo "Ya esta en uso ese puerto"
else
echo "acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl SSH dst $ip-$ip/255.255.255.255
http_access allow SSH
http_access allow manager localhost
http_access deny manager
http_access allow localhost
http_port $psquid
http_access deny all
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
visible_hostname VpsPack" >> /etc/squid/squid.conf
service squid restart 1> /dev/null 2> /dev/null
echo -e "⎇⇥ Instalacion Finalizada"
fi
echo -e "\033[1;33m › PRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack
}
function sqcentos1(){
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "Instalando Servicio Proxy Squid"
echo -e "\033[1;37mConfigurando, Espere...\033[0m"
yum install -y squid 1> /dev/null 2> /dev/null
yum install -y squid3 1> /dev/null 2> /dev/null
service httpd stop 1> /dev/null 2> /dev/null
rm /etc/squid/squid.conf 1> /dev/null 2> /dev/null
rm /etc/squid3/squid.conf 1> /dev/null 2> /dev/null
echo -e "⎇⇥ Escriba un puerto para Squid"
read -p ": " psquid
if lsof -Pi :$psquid -sTCP:LISTEN -t >/dev/null ; then
echo "Ya esta en uso ese puerto"
else
echo "acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl SSL_ports port 443
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
acl SSH dst $ip-$ip/255.255.255.255
http_access allow SSH
http_access allow manager localhost
http_access deny manager
http_access allow localhost
http_port $psquid
http_access deny all
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
visible_hostname VpsPack" >> /etc/squid3/squid.conf
service squid3 restart 1> /dev/null 2> /dev/null
echo -e "⎇⇥ Instalacion Finalizada"
fi
echo -e "\033[1;33m › PRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack
}
function chgroot(){
echo -e "Escriba el nuevo password para root"
passwd root
}
function rebootvps(){
echo -e "Reiniciando VPS"
sleep 10
reboot
}
function crearusuario(){
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "Crear Nuevo Usuario"
criarusuario
}
function puertosvps(){
vpspack 8
}
function sistemadetalhes(){
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m ∆ Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m ∆ IP VPS: $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\n\033[1;32mProcessador\033[0m"
modelo=$(cat /proc/cpuinfo |grep "model name" |uniq |awk -F : {'print $2'})
cpucores=$(cat /proc/cpuinfo |grep "cpu cores" |uniq |awk -F : {'print $2'})
cache=$(cat /proc/cpuinfo |grep "cache size" |uniq |awk -F : {'print $2'})
echo -e "\033[1;32mModelo:\033[0m$modelo"
echo -e "\033[1;32mNucleos:\033[0m$cpucores"
echo -e "\033[1;32mMemoria Cache:\033[0m$cache"
echo -e "\033[1;32mArquitetura: \033[0m$(uname -a)"
echo -e "\n\033[1;32mSistema Operacional\033[0m"
name=$(cat /etc/os-release |grep PRETTY_NAME |awk -F = {'print $2'})
codename=$(cat /etc/os-release |grep NAME |awk -F = {'print $2'})
echo -e "\033[1;32mNombre: \033[0m$name"
echo -e "\033[1;32mCodeName: \033[0m$codename"
echo -e "\033[1;32mKernel: \033[0m$(uname -s)"
echo -e "\033[1;32mKernel Release: \033[0m$(uname -r)"
echo -e "\n\033[1;32mMemoria RAM\033[0m"
echo -e "\033[1;32mTotal: \033[0m$(free -m |grep -i mem |awk {'print $2'}) MB | $(( $(free -m |grep -i mem |awk {'print $2'}) / 1024 )) GB"
echo -e "\033[1;32mEn Uso: \033[0m$(free -m |grep -i mem |awk {'print $3'}) MB | $(( $(free -m |grep -i mem |awk {'print $3'}) / 1024 )) GB"
echo -e "\033[1;32mLibre: \033[0m$(free -m |grep -i mem |awk {'print $4'}) MB | $(( $(free -m |grep -i mem |awk {'print $4'}) / 1024 )) GB"
echo -e "\n\033[1;32mSwap\033[0m"
echo -e "\033[1;32mTotal: \033[0m$(free -m |grep -i swap |awk {'print $2'}) MB | $(( $(free -m |grep -i swap |awk {'print $2'}) / 1024 )) GB"
echo -e "\033[1;32mEn Uso: \033[0m$(free -m |grep -i swap |awk {'print $3'}) MB | $(( $(free -m |grep -i swap |awk {'print $3'}) / 1024 )) GB"
echo -e "\033[1;32mLibre: \033[0m$(free -m |grep -i swap |awk {'print $4'}) MB | $(( $(free -m |grep -i swap |awk {'print $4'}) / 1024 )) GB"
}
function monitorar(){
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m            ─────────────────────────   \033[0m"
echo -e " \033[47;30m   Usuario            :               Conexiones   \033[0m"
echo -e "\033[1;37m            ─────────────────────────  \033[0m"
for usur in `awk -F : '$3 > 900 { print $1 }' /etc/passwd |grep -v "nobody" |grep -vi polkitd |grep -vi systemd-[a-z] |grep -vi systemd-[0-9] |sort`; do
if [ -f /etc/VpsPackdir/limite/$usur ]; then
limite=$(cat -n /etc/VpsPackdir/limite/$usur |awk '$1 = 1 {print $2}')
else
limite=null
fi
usurnum="$(ps -u $usur |grep sshd |wc -l)\033[1;32m/\033[1;33m$limite"
echo -e "\033[1;33m    $(printf '%-41s%s' $usur $usurnum) \033[0m"
echo -e "\033[1;37m             ─────────────────────────\033[0m"
done
echo -e "\033[1;33m › PRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 2
}
function removerexpirados(){
clear
echo -e "         \033[1;33mRemover Usuarios Expirados\033[0m"
datahoje=$(date +%s)
for user in $(cat /etc/passwd |grep -v "nobody" |awk -F : '$3 > 900 {print $1}')
do
dataexp=$(chage -l $user |grep "Account expires" |awk -F : '{print $2}')
if [[ $dataexp == ' never' ]]; then
id > /dev/null 2>/dev/null
else
dataexpn=$(date -d"$dataexp" '+%d/%m/%Y')
dataexpnum=$(date '+%s' -d"$dataexp")
fi
if [[ $dataexpnum < $datahoje ]]; then
printf "\033[1;31m"
printf '%-41s' $user
printf "\033[0m"
echo "Usuario expirado eliminado"
kill $(ps -u $user |awk '{print $1}') >/dev/null 2>/dev/null ; userdel $user
else
printf "\033[1;32m"
printf '%-41s' $user
printf "\033[0m"
echo $dataexpn
fi
done
}
function criarusuarioteste(){
mkdir /etc/usuariosteste 1>/dev/null 2>/dev/null
echo -e "   Usuarios de prueba"
for testus in $(ls /etc/usuariosteste |sort |sed 's/.sh//g')
do
echo "$testus"
done
printf "\n"
printf "Nombre del usuario: "; read nome
printf "Contraseña del usuario: "; read pass
echo -e "\nUse s = segundos, m = minutos, h = horas e d = dias EX: 14s ."
printf "Cuanto tiempo la cuenta $nome debe durar: ";read tempoin
tempo=$(echo "$tempoin" |sed 's/ //g')
useradd -M -s /bin/false $nome
(echo $pass;echo $pass) |passwd $nome 1>/dev/null 2>/dev/null
echo "#!/bin/bash
sleep $tempo
kill"' $(ps -u '"$nome |awk '{print"' $1'"}') 1>/dev/null 2>/dev/null
userdel --force $nome
rm -rf /etc/usuariosteste/$nome.sh
exit" > /etc/usuariosteste/$nome.sh
echo -e "Usuario: $nome
Contraseña: $pass
Validez: $tempo\n
Despues de expirar, los usuarios seran desconectados."
bash /etc/usuariosteste/$nome.sh &
exit
}
function removerlimite(){
echo -ne "\033[1;32mNombre del usuario a modificar: \033[0m"
read user
cronsemuser=$(cat /etc/crontab |grep -v "#$user#")
echo "$cronsemuser" > /etc/crontab
rm -rf /etc/VpsPackdir/limite/$user 2>/dev/null
rm -rf /etc/VpsPackdir/limite/$user.sh 2>/dev/null
pids=$(ps x |grep "#$user#" |awk {'print $1'})
kill $pids 2>/dev/null
kill "$pids" 2>/dev/null
kill -9 `ps x |grep "#$user#" |awk {'print $1'}` 2>/dev/null
kill `ps x |grep "#$user#" |awk {'print $1'}` 2>/dev/null
echo -e "\033[1;37mUsuario: $user, Limite removido\033[0m"
}
function backup_de_usuarios(){
clear
echo -e "\033[1;37mHaciendo respaldo de usuarios...\033[0m"
for user in `awk -F : '$3 > 900 { print $1 }' /etc/passwd |grep -v "nobody" |grep -vi polkitd |grep -vi systemd-[a-z] |grep -vi systemd-[0-9]`
do
if [ -e /etc/VpsPackdir/senha/$user ]
then
pass=$(cat /etc/VpsPackdir/senha/$user)
else
echo -e "\033[1;31mNo fue posible obtener la contraseña del usuario\033[1;37m ($user)"
read -p "Digite un contraseña manualmente y Tecle ENTER: " pass
fi
if [ -e /etc/VpsPackdir/limite/$user ]
then
limite=$(cat /etc/VpsPackdir/limite/$user)
echo "$user:$pass:$limite" >> /etc/VpsPackdir/backup
echo -e "\033[1;37mRespaldo del usuario $user [\033[1;31mOK\033[1;37m]\033[0m"
else
echo "$user:$pass" >> /etc/VpsPackdir/backup
echo -e "\033[1;37mRespaldo del usuario $user [\033[1;31mOK\033[1;37m]\033[0m"
fi
done
echo " "
echo -e "\033[1;31mBackup Completo !!!\033[0m"
echo " "
echo -e "\033[1;37mLa informacion de los usuarios se encuentra en el archivo \033[1;31m /etc/VpsPackdir/backup \033[1;37m
Guardelo para futuras actualizaciones\033[0m"
}
function mudarnome(){
printf "Nombre que desea modificar: "; read user
if cat /etc/passwd |grep $user: >/dev/null 2>/dev/null
then
printf ""
else
echo "Usuario no existe"
exit
fi
printf "Nuevo nombre para el usuario $user: "; read nome
usermod -l $nome $user 1>/dev/null 2>/dev/null
echo -e "\nUsuario: $user, Nuevo nombre: $nome."
exit
}
function firewallblock(){
echo "Configurando Bloqueo de Torrents."
sleep 1
iptables -N LOGDROP > /dev/null 2> /dev/null && iptables -F LOGDROP && iptables -A LOGDROP -j LOG --log-prefix "LOGDROP" && iptables -A LOGDROP -j DROP && iptables -A FORWARD -m string --algo bm --string "BitTorrent" -j LOGDROP && iptables -A FORWARD -m string --algo bm --string "BitTorrent protocol" -j LOGDROP && iptables -A FORWARD -m string --algo bm --string "peer_id=" -j LOGDROP && iptables -A FORWARD -m string --algo bm --string ".torrent" -j LOGDROP && iptables -A FORWARD -m string --algo bm --string "announce.php?passkey=" -j LOGDROP && iptables -A FORWARD -m string --algo bm --string "torrent" -j LOGDROP && iptables -A FORWARD -m string --algo bm --string "announce" -j LOGDROP && iptables -A FORWARD -m string --algo bm --string "info_hash" -j LOGDROP && iptables -A FORWARD -m string --string "get_peers" --algo bm -j LOGDROP && iptables -A FORWARD -m string --string "announce_peer" --algo bm -j LOGDROP && iptables -A FORWARD -m string --string "find_node" --algo bm -j LOGDROP
iptables -A INPUT -m string --string "BitTorrent" --algo bm -j DROP && iptables -A INPUT -m string --string "BitTorrent protocol" --algo bm -j DROP && iptables -A INPUT -m string --string "peer_id=" --algo bm -j DROP && iptables -A INPUT -m string --string ".torrent" --algo bm -j DROP && iptables -A INPUT -m string --string "announce.php?passkey=" --algo bm -j DROP && iptables -A INPUT -m string --string "torrent" --algo bm -j DROP && iptables -A INPUT -m string --string "announce" --algo bm -j DROP && iptables -A INPUT -m string --string "info_hash" --algo bm -j DROP && iptables -A INPUT -m string --string "tracker" --algo bm -j DROP && iptables -A INPUT -m string --string "get_peers" --algo bm -j DROP && iptables -A INPUT -m string --string "announce_peer" --algo bm -j DROP && iptables -A INPUT -m string --string "find_node" --algo bm -j DROP
echo -e "\033[1;37mFirewall Basico [activado]\033[0m"
echo -e "\033[1;37mVerifique las reglas instaladas con el comando:\033[0m"
echo -e "\033[1;37miptables -L\033[0m"
}
function dropbear(){
cd /root
./dropbear
cd /root
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack
}
function pl(){
cd /etc/VpsPackdir/
./pl.sh
cd /root
}
function resetfirewall(){
iptables -F
echo "Reglas FIREWALL Reseteadas"
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack
}
function puertos(){
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;32m     Puertos Disponibles / En ejecucion                \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
netstat -tulpn | awk -vOFS='\t' '/^tcp/{print $4,$7} /^udp/{print $4,$6}' | grep "$filter"
}
function dnshost(){
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m Escriba su Host\033[1;33m"
read -p ": " dnsx
cd /etc/VpsPackdir/
./d.sh "$dnsx"
cd /root/
}
function tools(){
clear
toolmaster
}
function drop(){
echo -e "\033[1;37m-------------------------------------------------------\033[0m"
echo -e "\033[42;30m USUARIO                :                 CONEXIONES \033[0m"
echo -e "\033[1;37m-------------------------------------------------------\033[0m"
for usur in `awk -F : '$3 > 900 { print $1 }' /etc/passwd |grep -v "nobody" |grep -vi polkitd |grep -vi systemd-[a-z] |grep -vi systemd-[0-9]`; do
usurnum=$(ps -u $usur |grep dropbear |wc -l)
echo -e "\033[1;33m $(printf '%-42s%s' $usur $usurnum) \033[0m"
echo -e "\033[1;37m -------------------------------------------------------\033[0m"
done
echo -e "\033[1;31mPRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function cache(){
echo "Limpiando sistema y Reiniciando Servicios"
echo 3 > /proc/sys/vm/drop_caches 1> /dev/null 2> /dev/null
sysctl -w vm.drop_caches=3 1> /dev/null 2> /dev/null
swapoff -a && swapon -a 1> /dev/null 2> /dev/null
killall badvpn-udpgw
badvpn start
echo "Limpieza Finalizada"
vpspack 9
}
function autolimpieza(){
echo -e "Activando autolimpieza del Servidor"
echo -e "Cada 3 horas se limpiará el Servidor automáticamente"
echo "0 */3 * * * root bash /etc/VpsPackdir/limpieza.sh" >> /etc/crontab
service cron restart
echo -e "Finalizando activacion"
vpspack
}
function monitorx(){
htop
}
info(){
clear
echo "VPSPack $vpspackversion"
echo "───────────────── /// ─────────────────###########"
echo "# Sistemas Instalados                            #"
echo "#                                                #"
echo "# OpenSSH     22                                 #"
echo "# Dropbear    443                                #"
echo "# Stunnel     442>22                             #"
echo "# Squid       3128 , 80, 8080                    #"
echo "# Python      4443                               #"
echo "# Shadowsocks 1080, 8388                         #"
echo "# OpenVPN     1194                               #"
echo "# Fail2Ban                                       #"
echo "# Webmin      10000                              #"
echo "# Ngix        81                                 #"
echo "# Netdata     19999                              #"
echo "# Darkstat    666 | 667                          #"
echo "#                                                #"
echo "#              -Extras-                          #"
echo "# Herramientas:                                  #"
echo "# DNS LookUp                                     #"
echo "# Whois Lookup                                   #"
echo "# Reverse IP                                     #"
echo "# GeoIP                                          #"
echo "# Subnet Lookup                                  #"
echo "# Port Scanner                                   #"
echo "# Extract Links                                  #"
echo "# Zone Transfer                                  #"
echo "# HTTP Header                                    #"
echo "# Host Finder                                    #"
echo "# TCP Speed                                      #"
echo "───────────────── /// ─────────────────###########"
echo "# @PowerMX                                       #"
echo "# Telegram : t.me/PwrMX                          #"
echo "# Web: powsita.com                                 #"
echo "───────────────── /// ─────────────────###########"
echo -e "\033[1;31mPRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function herramientas(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist: $distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP Publica VPS:\033[1;32m$ip \033[0m"
echo -e "\033[1;37m › Hostname VPS:\033[1;32m$host \033[0m"
echo -e "\033[1;37m › M: $memoriatotal MB ›Uso: $memoriauso MB ›Libre: $memorialibre MB\033[0m"
echo -e "\033[1;37m › P:$processor\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m       VPSPack $vpspackversion @ HERRAMIENTAS \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m]   \033[1;31m› \033[1;33mSCANNER \033[1;33m
[\033[1;32m2\033[1;33m]   \033[1;31m› \033[1;33mBUSCADOR DE HOST / DNS \033[1;33m
[\033[1;32m3\033[1;33m]   \033[1;31m› \033[1;33mGENERADOR DE PAYLOADS \033[1;33m
[\033[1;32m4\033[1;33m]   \033[1;31m› \033[1;33mLIMPIAR CACHE \033[1;33m
[\033[1;32m5\033[1;33m]   \033[1;31m› \033[1;33mMONITOR DE CPU \033[1;33m
[\033[1;32m6\033[1;33m]   \033[1;31m› \033[1;33mADMINISTRADOR DE PROCESOS \033[1;33m
[\033[1;32m7\033[1;33m]   \033[1;31m› \033[1;33mBADVPN ALTERNO (EXPERIMENTAL) \033[1;33m
[\033[1;32m8\033[1;33m]   \033[1;31m› \033[1;33mNODEJS & NPM (EXPERIMENTAL) \033[1;33m
[\033[1;32m9\033[1;33m]   \033[1;31m› \033[1;33mREDIRECCIONADORES SSL \033[1;33m
[\033[1;32m10\033[1;33m]  \033[1;31m› \033[1;33mSOPORTE TLS 1.3 (EXPERIMENTAL)\033[1;33m
[\033[1;32m11\033[1;33m]  \033[1;31m› \033[1;33mAUTOLIMPIEZA\033[1;33m
[\033[1;32m12\033[1;33m]  \033[1;31m› \033[1;33mFIX PASSWORD (vultr)\033[1;33m
[\033[1;32m13\033[1;33m]  \033[1;31m› \033[1;33mMULTIPORT\033[1;33m
[\033[1;32m14\033[1;33m]  \033[1;31m› \033[1;33mDNS FINDER\033[1;33m
[\033[1;32m15\033[1;33m]  \033[1;31m› \033[1;33mSSL ANALIZER \033[1;33m
[\033[1;32m16\033[1;33m]  \033[1;31m› \033[1;33mHOSTNAME \033[1;33m
[\033[1;32m17\033[1;33m]  \033[1;31m› \033[1;33mTCP-TWEAKER \033[1;33m
[\033[1;32m18\033[1;33m]  \033[1;31m› \033[1;33mCUSTOM LOGO\033[1;33m
[\033[1;32m19\033[1;33m]  \033[1;31m› \033[1;33mCUSTOM NAME\033[1;33m
[\033[1;32m20\033[1;33m]  \033[1;31m› \033[1;33mTOP MEMORY\033[1;33m
[\033[1;32m21\033[1;33m]  \033[1;31m› \033[1;33mPYTHON PROXY\033[1;33m
[\033[1;32m22\033[1;33m]  \033[1;31m› \033[1;33mAPACHE\033[1;33m
[\033[1;32m23\033[1;33m]  \033[1;31m› \033[1;33mCUSTOM MENU\033[1;33m
[\033[1;32m24\033[1;33m]  \033[1;31m› \033[1;33mCERTIFICADO LETSENCRYPT\033[1;33m
[\033[1;32m25\033[1;33m]  \033[1;31m› \033[1;33mFIX SOURCES\033[1;33m
[\033[1;32m26\033[1;33m]  \033[1;31m› \033[1;33mSWAP MEMORY\033[1;33m
[\033[1;32m27\033[1;33m]  \033[1;31m› \033[1;33mNOTIFICACIONES (EXPERIMENTAL) \033[1;33m
[\033[1;32m28\033[1;33m]  \033[1;31m› \033[1;33mGO \033[1;33m
[\033[1;32m29\033[1;33m]  \033[1;31m› \033[1;33mDOCKER \033[1;33m
[\033[1;32m30\033[1;33m]  \033[1;31m› \033[1;33mDNS NETFLIX \033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
tools;;
2)
dnshost;;
3)
pl;;
4)
cache;;
5)
monitorx;;
6)
administradorprocesos;;
7)
badvpnalterno;;
8)
nodejs;;
9)
redireccionadoresssl;;
10)
tls13;;
11)
autolimpieza;;
12)
fixvultr;;
13)
multi;;
14)
dnssublister;;
15)
xsslyze;;
16)
hostvps;;
17)
tweak;;
18)
logocustom;;
19)
namecustom;;
20)
topmem;;
21)
pythonproxy;;
22)
apacheins;;
23)
custommenu;;
24)
letsencrypt;;
25)
fixsources;;
26)
swap;;
27)
notificaciones;;
28)
goinst;;
29)
dockerio;;
30)
dnsnetflix;;
0)
vpspack;;
esac
}
function dnsnetflix(){
echo -e "A continuacion se instalara el DNS funcional para Netflix"
echo -e "Si no cuenta con una DNS contrate una en Telegram: @PowerMX"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
echo -e "Escriba la IP del DNS funcional para Netflix"
read -p ": " dnsnetf
echo "nameserver $dnsnetf" >> /etc/resolv.conf
fi
echo -e "\033[1;31mConfiguracion Aplicada\033[0m"
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function dockerio(){
echo -e "A continuacion se instalara el paquete Docker"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
echo -e "Instalando..."
cd
apt-get install docker.io -y 1> /dev/null 2> /dev/null
apt-get install docker-compose -y 1> /dev/null 2> /dev/null
fi
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function goinst(){
echo -e "A continuacion se instalara el paquete GO Lang"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
echo -e "Instalando..."
cd
rm -rf /usr/local/go 1> /dev/null 2> /dev/null
wget https://golang.org/dl/go1.15.linux-amd64.tar.gz 1> /dev/null 2> /dev/null
tar -C /usr/local -xzf go1.15.linux-amd64.tar.gz
if cat /root/.bashrc | grep GOROOT; then
echo -e "Ya existe un GoROOT - Skipping"
else
sed -i '$a export GOROOT=/usr/local/go' /root/.bashrc
sed -i '$a export GOPATH=$HOME/go' /root/.bashrc
sed -i '$a export PATH=$GOPATH/bin:$GOROOT/bin:$PATH' /root/.bashrc
rm go1.15.linux-amd64.tar.gz
source /root/.bashrc
fi
sleep 5
echo -e "Reiniciando Fuente de Terminal..."
fi
echo -e "\033[1;33m Para finalizar el proceso de Instalacion de GO escribe :\033[0m"
echo -e "\033[1;32m source ~/.profile\033[0m"
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
exit 0
}
function notificaciones(){
echo -e "Se habilitaran las notificaciones para Android"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
echo -e "Instalando..."
apt-get install npm -y 1> /dev/null 2> /dev/null
npm install -g notify-cli 1> /dev/null 2> /dev/null
fi
echo -e "Se instalaron las notificaciones de sistema"
echo -e "Descargue la aplicacion para Android desde los archivos del canal de telegram"
echo -e "Canal de Telegram: @PwrMX"
echo -e "Registre su telefono escribiendo a continuacion su token:"
echo -e "(Respete Mayusculas y minusculas)"
read -p ": " tokennoti
notify -r $tokennoti
echo -e "A continuacion recibira una notificacion de prueba"
echo -e "Si no recibio la notificacion instale nuevamente las notificaciones"
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function swap(){
echo -e "Se instalara la particion SWAP en tu vps"
echo -e "A coninuacion escribe la cantidad de GB"
echo -e "Que se agregaran como particion SWAP"
echo -e "No puede exceder el tamaño del disco duro de tu vps"
echo -e "ejemplo : 5G"
echo -e "Cuantos GB quieres agregar a memoria SWAP"
read -p ": " gbswap
set -e
fallocate -l $gbswap /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile   none    swap    sw    0   0" | sudo tee -a /etc/fstab
echo -e "Proceso finalizado [complete]"
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function fixsources19(){
echo -e "Reinstalando fuentes (sources)"
curl -o /etc/apt/sources.list https://raw.githubusercontent.com/powermx/sources/master/Ubuntu19.10/sources.list && apt-get update && apt-get upgrade -y
echo -e "Reinstalacion completada"
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function fixsources18(){
echo -e "Reinstalando fuentes (sources)"
curl -o /etc/apt/sources.list https://raw.githubusercontent.com/powermx/sources/master/ubuntu18.04/sources.list && apt-get update && apt-get upgrade -y
echo -e "Reinstalacion completada"
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function fixsources16(){
echo -e "Reinstalando fuentes (sources)"
curl -o /etc/apt/sources.list https://raw.githubusercontent.com/powermx/sources/master/ubuntu16.04/sources.list && apt-get update && apt-get upgrade -y
echo -e "Reinstalacion completada"
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function fixsources(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;30m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;30m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m       VPSPack $vpspackversion @ FIX SOURCES \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m]   › FIX SOURCES UBUNTU 16.04 \033[1;33m
[\033[1;32m2\033[1;33m]   › FIX SOURCES UBUNTU 18.04 \033[1;33m
[\033[1;32m3\033[1;33m]   › FIX SOURCES UBUNTU 19.10 \033[1;33m
[\033[1;32m4\033[1;33m]   › FIX SOURCES UBUNTU 20.04 \033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR                 \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
fixsources16;;
2)
fixsources18;;
3)
fixsources19;;
4)
fixsources20;;
0)
vpspack 10;;
esac
}
function letsencrypt(){
echo -e "Se instalara un certificado Letsencrypt"
echo -e "En el proceso se te pedira un email y aceptar terminos"
echo -e "Escriba el nombre de su Subdominio:"
read -p ": " letsname
apt-get install certbot -y
certbot certonly --standalone -d $letsname -d $letsname
clear
echo -e "Se han creado los certificados"
echo -e "El path del directorio con los certificados es:"
echo -e "/etc/letsencrypt/live/$letsname/"
echo -e " "
echo -e "Los archivos generados son:"
echo -e "/etc/letsencrypt/live/$letsname/cert.pem"
echo -e "/etc/letsencrypt/live/$letsname/chain.pem"
echo -e "/etc/letsencrypt/live/$letsname/fullchain.pem"
echo -e "/etc/letsencrypt/live/$letsname/privkey.pem"
}
function custommenu(){
echo -e "Escriba el nuevo alias para el menu:"
read -p ": " namemenu
touch /bin/$namemenu
chmod +x /bin/$namemenu
echo "vpspack" >> /bin/$namemenu
echo -e "Se ha creado el alias $namemenu "
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function apacheins(){
echo -e "Se instalará Apache en puerto 85"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
echo -e "Espere..."
echo -e "Realizando Limpieza.."
apt-get remove apache2 -y && apt-get purge apache2 -y 1> /dev/null 2> /dev/null
rm -rf /var/wwww/html/* 1> /dev/null 2> /dev/null
service apache2 stop 1> /dev/null 2> /dev/null
echo -e "Instalando Fuentes.."
apt-get install apache2 -y 1> /dev/null 2> /dev/null
echo -e "Configurando .."
sed -i 's/Listen 80/Listen 85/g' /etc/apache2/ports.conf 1> /dev/null 2> /dev/null
wget -o /dev/null -O- wget https://raw.githubusercontent.com/kirrathmx/dl/master/index.txt > /var/www/html/index.html 1> /dev/null 2> /dev/null
cd /root
echo -e "Iniciando Proceso..."
service apache2 restart 1> /dev/null 2> /dev/null
fi
echo -e "Servidor Apache Instalado en puerto 85"
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function pythonproxy(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m       VPSPack $vpspackversion @ PYTHON \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m]   › Proxy Python Redir \033[1;33m
[\033[1;32m2\033[1;33m]   › Proxy Python Socket \033[1;33m
[\033[1;32m3\033[1;33m]   › Proxy Python GetTunnel \033[1;33m
[\033[1;32m4\033[1;33m]   › Proxy Python TCP-Over \033[1;33m
[\033[1;32m5\033[1;33m]   › Proxy Python Directo \033[1;33m
[\033[1;32m6\033[1;33m]   › Proxy Python Publico \033[1;33m
[\033[1;32m7\033[1;33m]   › Proxy Python Privado \033[1;33m
[\033[1;32m8\033[1;33m]   › Proxy Python Custom \033[1;33m
[\033[1;32m9\033[1;33m]   › Proxy Python Multi Protocolos \033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR                 \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
pythonredir;;
2)
pythonsocket;;
3)
gettunnel;;
4)
tcpover;;
5)
pythondirecto;;
6)
pythonpublico;;
7)
pythonprivado;;
8)
pythoncustom;;
9)
pythonmulti;;
0)
vpspack 10;;
esac
}
function pythonmulti(){
echo -e "Se instalará el Proxy Python Multi Protocolos"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
echo -e "Instalando dependencias"
curl https://bootstrap.pypa.io/get-pip.py -o /etc/VpsPackdir/get-pip.py 1> /dev/null 2> /dev/null
python /etc/VpsPackdir/get-pip.py 1> /dev/null 2> /dev/null
apt-get install python -y 1> /dev/null 2> /dev/null
apt-get remove python3 -y 1> /dev/null 2> /dev/null && apt-get install python3 -y 1> /dev/null 2> /dev/null
pip3 install pproxy 1> /dev/null 2> /dev/null
echo -e "Escriba el nuevo puerto para el Proxy Python Multi Protocolos:"
read -p ": " multipy
screen -dmS multi$multipy pproxy -l http://:$multipy
echo -e "Proxy Python http iniciado en Puerto $multipy"
fi
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function pythoncustom(){
echo -e "Se instalará el Proxy Python Directo Custom"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
apt-get install python -y 1> /dev/null 2> /dev/null
apt-get install python3 -y 1> /dev/null 2> /dev/null
echo -e "Escriba el nuevo puerto para el Proxy Python Custom:"
read -p ": " cpdir
cp /etc/VpsPackdir/Directo.py /etc/VpsPackdir/Directo$cpdir.py
echo -e "Escriba el puerto al servicio donde lo va a redirigir:"
read -p ": " usedport
sed -i "s|127.0.0.1:22|127.0.0.1:$usedport|g" /etc/VpsPackdir/Directo$cpdir.py
screen -dmS pydir python /etc/VpsPackdir/Directo$cpdir.py "$cpdir"
echo -e "Proxy Custom iniciado en Puerto Custom $cpdir"
fi
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function pythonprivado(){
echo -e "Se instalará el Proxy Python Directo"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
bash /etc/VpsPackdir/priv.sh
fi
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function pythonpublico(){
echo -e "Se instalará el Proxy Python Directo"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
apt-get install python -y 1> /dev/null 2> /dev/null
apt-get install python3 -y 1> /dev/null 2> /dev/null
bash /etc/VpsPackdir/pub.sh
fi
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function pythondirecto(){
echo -e "Se instalará el Proxy Python Directo"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
apt-get install python -y 1> /dev/null 2> /dev/null
apt-get install python3 -y 1> /dev/null 2> /dev/null
echo -e "Escriba el puerto para el Proxy Directo:"
read -p ": " pdir
screen -dmS pydir python /etc/VpsPackdir/Directo.py "$pdir"
echo -e "Proxy Directo iniciado en Puerto Custom $pdir"
fi
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function tcpover(){
echo -e "Se instalará el Proxy Python TCP-Over"
echo -e "Se desinstalar SQUID/DROPBEAR"
echo -e "Se Necesitan los Puertos 80 8080 3128 y 443 libres"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
cp /etc/VpsPackdir/socks/scktcheck /usr/sbin/scktcheck
chmod +x /usr/sbin/scktcheck
echo -e "Escriba el puerto para TCP-Over Proxy:"
read -p ": " ptcp
echo -e "Escriba el MSG para TCP-Over Proxy"
echo -e "Ejemplo:"
echo -e "VpsPack"
read -p ": " mtcp
cd /etc/VpsPackdir/socks/
dos2unix instalar 1> /dev/null 2> /dev/null
bash instalar "$mtcp" 1> /dev/null 2> /dev/null
screen -dmS sokz scktcheck "$ptcp" "$mtcp" 1> /dev/null 2> /dev/null
cd /root
echo -e "TCP Over Instalado en Puerto Custom $ptcp"
fi
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function gettunnel(){
echo -e "Se instalará el Proxy Python GetTunnel"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
touch /etc/VpsPackdir/socks/pwd.pwd
echo -e "Escriba el puerto para GetTunnel Proxy:"
read -p ": " pget
screen -dmS getpy python /etc/VpsPackdir/PGet.py -b "0.0.0.0:$pget" -p vpspack
echo -e "Proxy Python GetTunnel Iniciado en puerto $pget "
fi
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function pythonredir(){
echo -e "Se instalará el Redireccionador Python"
echo -e "Puerto 4443 redireccionado a 22"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
cd /root
screen -dmS prodir python /etc/VpsPackdir/proxyredir.py
fi
echo -e "Proxy Activado"
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function pythonsocket(){
echo -e "Se instalará el Proxy Python Socket"
echo -e "Puerto activado: 9090"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
cd /root
screen -dmS prosock python /etc/VpsPackdir/proxysocket.py "9090" "PowerMX"
fi
echo -e "Proxy Activado"
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function topmem(){
echo -e "Procesos con mayor consumo de memoria:"
echo -e "_____________________________"
ps -Ao user,uid,comm,pid,pcpu,tty --sort=-pcpu | head -n 6
echo -e "_____________________________"
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function namecustom(){
echo -e "A continuacion se añadira un nuevo nombre"
echo -e "En la cabecera del script"
echo -e "Escriba el nuevo nombre:"
read -p ": " namex
rm /root/name
echo "$namex" >> /root/name
echo -e "Su nuevo Header Name es:"
cat /root/name
echo -e " "
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function logocustom(){
echo -e "A continuacion se añadira un nuevo a su sistema de usuarios"
echo -e "Escriba la URL que contenga su logo ascii"
read -p ": " logox
curl -o /etc/VpsPackdir/logo $logox
echo -e "Su nuevo logo es:"
cat /etc/VpsPackdir/logo
echo -e " "
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function tweak(){
echo -e "A continuacion se realizaran los ajustes"
wget https://raw.githubusercontent.com/powermx/tcptweaker/master/tweaker.sh 1> /dev/null 2> /dev/null; chmod +x tweaker.sh; ./tweaker.sh; rm tweaker.sh
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function hostvps(){
echo -e "⎇⇥ Escriba un nombre del nuevo host de su vps"
read -p ": " hs
hostnamectl set-hostname $hs
echo -e "El nuevo Host es: $hs "
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 9
}
function dnssublister(){
echo -e "A continuacion se instalara el Scanner DNS Sub"
echo -e "Este paquete solo funcionara en Debian/Ubuntu"
echo -e "espera un momento..."
apt-get install python-requests -y 1> /dev/null 2> /dev/null
apt-get install python-dnspython -y 1> /dev/null 2> /dev/null
apt-get install python-argparse -y 1> /dev/null 2> /dev/null
git clone https://github.com/aboul3la/Sublist3r.git
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "La instalacion basica ha finalizado"
echo -e "Se ha creado el directorio correctamente: Sublist3r"
}
function xsslyze(){
echo -e "A continuacion se instalara el SSlyze"
echo -e "Este paquete solo funcionara en Debian/Ubuntu"
echo -e "espera un momento..."
cd /root
wget https://github.com/nabla-c0d3/sslyze/archive/2.1.4.zip 1> /dev/null 2> /dev/null
unzip 2.1.4.zip 1> /dev/null 2> /dev/null
cd sslyze-2.1.4 1> /dev/null 2> /dev/null
python3 setup.py install 1> /dev/null 2> /dev/null
cd /root
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "La instalacion basica ha finalizado"
echo -e "Se ha creado el directorio correctamente: SSLyze"
echo -e "Ejemplo: sslyze c.whatsapp.net:443"
}
function multi(){
clear
echo -e "Preparando Servicios"
apt-get remove sslh -y 1> /dev/null 2> /dev/null
apt-get purge sslh -y 1> /dev/null 2> /dev/null
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "Instalando MultiPort"
echo -e ""
DEBIAN_FRONTEND=noninteractive apt-get install sslh -y 1> /dev/null 2> /dev/null
rm /etc/default/sslh
cp /etc/VpsPackdir/sslhconf /etc/default/sslh
systemctl enable sslh 1> /dev/null 2> /dev/null
sleep 3
echo "Reiniciando Servicio para ejecutar cambios"
systemctl restart sslh 1> /dev/null 2> /dev/null
sleep 5
vpspack
}
function fixvultr(){
echo -e "Añadiendo Registro a PAM.D"
sed -i 's/.*pam_cracklib.so.*/password sufficient pam_unix.so sha512 shadow nullok try_first_pass #use_authtok/' /etc/pam.d/common-password
echo -e "Registro agregado"
sleep 6
vpspack
}
function tls13(){
apt-get install -y git autoconf libtool
git clone https://github.com/wolfssl/wolfssl.git
cd wolfssl/
./autogen.sh
./configure --enable-sha512
make
make install
ldconfig
./configure --enable-stunnel --enable-tls13
make
make install
ldconfig
service stunnel4 restart
cd /root
}
function redirssl(){
echo -e "Escriba un nombre para el Redireccionador SSL"
read -p ": " nombressl
echo -e "Escriba el puerto del Servicio a enlazar"
read -p ": " portserv
echo -e "Escriba el Nuevo Puerto SSL"
read -p ": " portssl
if lsof -Pi :$portssl -sTCP:LISTEN -t >/dev/null ; then
echo "Ya esta en uso ese puerto"
else
echo "[$nombressl] " >> /etc/stunnel/stunnel.conf
echo "cert = /etc/stunnel/stunnel.pem " >> /etc/stunnel/stunnel.conf
echo "accept = $portssl " >> /etc/stunnel/stunnel.conf
echo "connect = 127.0.0.1:$portserv" >> /etc/stunnel/stunnel.conf
sleep 5
echo "Reiniciando Servicio : Stunnel4"
service stunnel4 restart 1> /dev/null 2> /dev/null
sleep 5
vpspack
fi
}
function redirssllets(){
echo -e "Se instalara un redireccionador SSL con certificado LetsEncrypt"
echo -e "Dicho certificado debera estar instalado previamente"
echo -e "Continuar?"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
echo -e "Escriba un nombre para el Redireccionador SSL Letsencrypt"
read -p ": " nombressllets
echo -e "Escriba el nombre del subdominio de su VPS"
read -p ": " domain
echo -e "Escriba el puerto del Servicio a enlazar"
read -p ": " portservlets
echo -e "Escriba el Nuevo Puerto SSL"
read -p ": " portssllets
if lsof -Pi :$portssllets -sTCP:LISTEN -t >/dev/null ; then
echo "Ya esta en uso ese puerto"
else
echo "[$nombressllets] " >> /etc/stunnel/stunnel.conf
echo "accept = $portssllets " >> /etc/stunnel/stunnel.conf
echo "cert = /etc/letsencrypt/live/$domain/cert.pem " >> /etc/stunnel/stunnel.conf
echo "key = /etc/letsencrypt/live/$domain/privkey.pem " >> /etc/stunnel/stunnel.conf
echo "connect = $ip:$portservlets" >> /etc/stunnel/stunnel.conf
echo "ciphers = ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-$options = CIPHER_SERVER_PREFERENCE" >> /etc/stunnel/stunnel.conf
echo "renegotiation=no" >> /etc/stunnel/stunnel.conf
sleep 5
echo "Reiniciando Servicio : Stunnel4"
service stunnel4 restart 1> /dev/null 2> /dev/null
sleep 5
fi
vpspack
fi
}
function redireccionadoresssl(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m       VPSPack $vpspackversion @ REDIRECCIONADORES SSL\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m] REDIRECCIONADOR SSL NORMAL \033[1;32m \033[1;33m
[\033[1;32m2\033[1;33m] REDIRECCIONADOR SSL LETSENCRYPT\033[1;32m \033[1;33m
[\033[1;32m0\033[1;33m] REGRESAR \033[1;32m \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
redirssl;;
2)
redirssllets;;
0)
vpspack;;
esac
}
function nodejs(){
echo -e "Instalando NodeJS & NPM"
apt-get install nodejs -y && apt-get install npm -y 1> /dev/null 2> /dev/null
echo -e "Instalacion Finalizada"
}
function badvpnalterno(){
clear
echo "Instalando BADVPN Alterno"
wget --no-check-certificate https://raw.githubusercontent.com/powermx/badudp/master/install && bash install
}
function actualizar(){
cd /etc/VpsPackdir/v/ && bash version.sh && cd /root
}
firewallon (){
read -p "Escriba su IP: " -e -i $1 ip
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
echo Configurando FIREWALL...
sleep 1
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t filter -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -d $ip --dport 443 -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p tcp -d $ip --dport 80 -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p tcp --dport 53 -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p udp --dport 53 -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p tcp --dport 67 -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p udp --dport 67 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 3128 -j ACCEPT
iptables -A INPUT -p tcp --dport 8799 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 8080 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 3128 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 8799 -j ACCEPT
iptables -A FORWARD -p tcp --dport 8080 -j ACCEPT
iptables -A FORWARD -p tcp --dport 80 -j ACCEPT
iptables -A FORWARD -p tcp --dport 3128 -j ACCEPT
iptables -A FORWARD -p tcp --dport 8799 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j DROP
iptables -A INPUT -p tcp --dport 10000 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 10000 -j ACCEPT
echo -e "\033[1;36mFirewall modificado
Puertos Modificados - 443 22 8799 8080 80 3128
Bloqueo - ICMP
Bloqueo - Torrent
Proteccion Low Mode DDoS
\033[0m"
touch /etc/VpsPackdir/firewall
exit
}
function fix(){
echo "Removiendo paquetes (Ajustes)"
apt-get -y remove squid3 1> /dev/null 2> /dev/null
apt-get -y purge squid3 1> /dev/null 2> /dev/null
apt-get -y remove dropbear 1> /dev/null 2> /dev/null
apt-get -y purge dropbear 1> /dev/null 2> /dev/null
echo "Finalizado"
vpspack 1
}
function monitores(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m       VPSPack $vpspackversion @ MONITOR\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m] OPENSSH \033[1;32m \033[1;33m
[\033[1;32m2\033[1;33m] DROPBEAR \033[1;32m \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
monitorar;;
2)
dropbear;;
esac
}
function administradorprocesos(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m       VPSPack $vpspackversion @ ADMINISTRADOR PROCESOS\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m] ENCENDER \033[1;32m([\033[1;31mINICIAR PROCESOS\033[1;32m])\033[1;33m
[\033[1;32m2\033[1;33m] DETENER \033[1;32m([\033[1;31mDETENER PROCESOS\033[1;32m])\033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR                 \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
encender;;
2)
detener;;
0)
vpspack;;
esac
}
function encender(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m] SSH \033[1;32m(Inicia OpenSSH [\033[1;31mRIESGO\033[1;32m])\033[1;33m
[\033[1;32m2\033[1;33m] DROPBEAR \033[1;32m(Inicia Dropbear)\033[1;33m
[\033[1;32m3\033[1;33m] SQUID \033[1;32m(Inicia Squid)\033[1;33m
[\033[1;32m4\033[1;33m] PYTHON \033[1;32m(Inicia Python)\033[1;33m
[\033[1;32m5\033[1;33m] SSL \033[1;32m(Inicia SSL)\033[1;33m
[\033[1;32m6\033[1;33m] APACHE \033[1;32m(Inicia Apache)\033[1;33m
[\033[1;32m7\033[1;33m] SHADOWSOCKS \033[1;32m(Inicia Shadowsocks)\033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR                 \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
encenderssh;;
2)
encenderdropbear;;
3)
encendersquid;;
4)
encenderpython;;
5)
encenderssl;;
6)
encenderapache;;
7)
encendershadow;;
0)
vpspack;;
esac
}
function encenderssh(){
service ssh start > /dev/null 2> /dev/null
echo "Servicio Iniciado"
sleep 3
vpspack
}
function encenderdropbear(){
service dropbear start > /dev/null 2> /dev/null
echo "Servicio Iniciado"
sleep 3
vpspack
}
function encendersquid(){
service squid start && service squid3 start > /dev/null 2> /dev/null
echo "Servicio Iniciado"
sleep 3
vpspack
}
function encenderpython(){
screen -dmS pro python /root/proxy.py > /dev/null 2> /dev/null
echo "Servicio Iniciado"
sleep 3
vpspack
}
function encenderssl(){
service stunnel4 start > /dev/null 2> /dev/null
echo "Servicio Iniciado"
sleep 3
vpspack
}
function encenderapache(){
service apache2 start > /dev/null 2> /dev/null
echo "Servicio iniciado"
sleep 3
vpspack
}
function encendershadow(){
/etc/init.d/shadowsocks-python start > /dev/null 2> /dev/null
echo "Servicio iniciado"
sleep 3
vpspack
}
function detener(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m] SSH \033[1;32m(Detiene OpenSSH [\033[1;31mRIESGO\033[1;32m])\033[1;33m
[\033[1;32m2\033[1;33m] DROPBEAR \033[1;32m(Detiene Dropbear)\033[1;33m
[\033[1;32m3\033[1;33m] SQUID \033[1;32m(Detiene Squid)\033[1;33m
[\033[1;32m4\033[1;33m] PYTHON \033[1;32m(Detiene Python)\033[1;33m
[\033[1;32m5\033[1;33m] SSL \033[1;32m(Detiene SSL)\033[1;33m
[\033[1;32m6\033[1;33m] APACHE \033[1;32m(Detiene Apache)\033[1;33m
[\033[1;32m7\033[1;33m] SHADOWSOCKS \033[1;32m(Detiene Shadowsocks)\033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR                 \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
detenerssh;;
2)
detenerdropbear;;
3)
detenersquid;;
4)
detenerpython;;
5)
detenerssl;;
6)
detenerapache;;
7)
detenershadow;;
0)
vpspack;;
esac
}
function detenerssh(){
service ssh stop > /dev/null 2> /dev/null
echo "Servicio Detenido"
sleep 3
vpspack
}
function detenerdropbear(){
service dropbear stop > /dev/null 2> /dev/null
killall dropbear
echo "Servicio Detenido"
sleep 3
vpspack
}
function detenersquid(){
service squid stop && service squid3 stop > /dev/null 2> /dev/null
echo "Servicio Detenido"
sleep 3
vpspack
}
function detenerpython(){
pkill python && killall python > /dev/null 2> /dev/null
echo "Servicio Detenido"
sleep 3
vpspack
}
function detenerssl(){
service stunnel4 stop > /dev/null 2> /dev/null
echo "Servicio Detenido"
sleep 3
vpspack
}
function detenerapache(){
service apache2 stop > /dev/null 2> /dev/null
echo "Servicio Detenido"
sleep 3
vpspack
}
function detenershadow(){
/etc/init.d/shadowsocks-libev stop > /dev/null 2> /dev/null
/etc/init.d/shadowsocks stop > /dev/null 2> /dev/null
/etc/init.d/shadowsocks-r stop > /dev/null 2> /dev/null
echo "Servicios Detenidos"
sleep 3
vpspack
}
function addport(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m       VPSPack $vpspackversion @ Agregar Puerto \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m Escoja el servicio para agregarle un puerto\033[1;33m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m] SSH \033[1;33m
[\033[1;32m2\033[1;33m] DROPBEAR \033[1;33m
[\033[1;32m3\033[1;33m] SQUID \033[1;33m
[\033[1;32m4\033[1;33m] SSL \033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
addportssh;;
2)
addportdrop;;
3)
addportsquid;;
4)
addportssl;;
0)
vpspack;;
esac
}
function addportssh(){
echo "Nuevo Puerto a Agregar:"
read -p ": " portssh
if lsof -Pi :$portssh -sTCP:LISTEN -t >/dev/null ; then
echo "Ya esta en uso ese puerto"
else
sed -i "5i Port $portssh" /etc/ssh/sshd_config
sleep 10
echo "Reiniciando OpenSSH para ejecutar cambios"
service ssh restart
sleep 10
vpspack
fi
}
function addportdrop(){
echo "Nuevo Puerto a Agregar:"
read -p ": " portdrop
if lsof -Pi :$portdrop -sTCP:LISTEN -t >/dev/null ; then
echo "Ya esta en uso ese puerto"
else
sed -i "8d" /etc/default/dropbear
sed -i '8i DROPBEAR_EXTRA_ARGS="-p '"$portdrop"'"' /etc/default/dropbear
sleep 10
echo "Reiniciando Dropbear para ejecutar cambios"
service dropbear restart
sleep 10
vpspack
fi
}
function addportsquid(){
echo "Nuevo Puerto a Agregar:"
read -p ": " portsquid
if lsof -Pi :$portsquid -sTCP:LISTEN -t >/dev/null ; then
echo "Ya esta en uso ese puerto"
else
sed -i "1i http_port $portsquid" /etc/squid3/squid.conf 1> /dev/null 2> /dev/null
sed -i "1i http_port $portsquid" /etc/squid/squid.conf 1> /dev/null 2> /dev/null
sleep 5
echo "Reiniciando Servicio : Squid"
service squid restart 1> /dev/null 2> /dev/null
service squid3 restart 1> /dev/null 2> /dev/null
sleep 5
vpspack
fi
}
function addportssl(){
echo -e "Escriba el Puerto a Utilizar"
read -p ": " portssl
if lsof -Pi :$portssl -sTCP:LISTEN -t >/dev/null ; then
echo "Ya esta en uso ese puerto"
else
rm /etc/stunnel/stunnel.conf
echo "client = no " >> /etc/stunnel/stunnel.conf
echo "[ssh] " >> /etc/stunnel/stunnel.conf
echo "cert = /etc/stunnel/stunnel.pem " >> /etc/stunnel/stunnel.conf
echo "accept = $portssl " >> /etc/stunnel/stunnel.conf
echo "connect = 127.0.0.1:22" >> /etc/stunnel/stunnel.conf
sleep 5
echo "Reiniciando Servicio : Stunnel4"
service stunnel4 restart 1> /dev/null 2> /dev/null
sleep 5
vpspack
fi
}
function gestionusuarios(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Usuarios En Linea: $_onlin › Cuentas: $_tuser\033[0m"
echo -e "\033[1;37m › SSH: $_ons› Dropbear: $_ondrp\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m - GESTION DE USUARIOS -\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m]  LIMITE DE CONEXIONES\033[1;33m
[\033[1;32m2\033[1;33m]  CREAR USUARIO\033[1;33m
[\033[1;32m3\033[1;33m]  REMOVER USUARIOS EXPIRADOS\033[1;33m
[\033[1;32m4\033[1;33m]  CREAR USUARIO DE PRUEBA\033[1;33m
[\033[1;32m5\033[1;33m]  REMOVER LIMITE DE CONEXIONES\033[1;33m
[\033[1;32m6\033[1;33m]  MODIFICAR NOMBRE DE USUARIO \033[1;33m
[\033[1;32m7\033[1;33m]  MODIFICAR USUARIO\033[1;33m
[\033[1;32m8\033[1;33m]  ELIMINAR USUARIO\033[1;33m
[\033[1;32m9\033[1;33m]  MONITOR USUARIOS\033[1;33m
[\033[1;32m10\033[1;33m] RESPALDO DE USUARIO\033[1;33m
[\033[1;32m11\033[1;33m] RESTAURAR USUARIOS\033[1;33m
[\033[1;32m12\033[1;33m] DETALLE DE USUARIOS\033[1;33m
[\033[1;32m13\033[1;33m] ELIMINAR TODOS LOS USUARIOS\033[1;33m
[\033[1;32m14\033[1;33m] LIMITAR CONEXIONES SHADOWSOCKS (EXPERIMENTAL)\033[1;33m
[\033[1;32m15\033[1;33m] RENOVAR USUARIO\033[1;33m
[\033[1;32m16\033[1;33m] ACTIVAR LIMITE USUARIOS SSH/DROPBEAR \033[1;32m$droplim \033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1 | 01 )
read -p "Usuario: " user
read -p "Limite: " limite
limite $user $limite;;
2 | 02 )
criarusuario;;
3 | 03 )
removerexpirados;;
4 | 04 )
criarusuarioteste;;
5 | 05 )
removerlimite;;
6 | 06 )
mudarnome;;
7 | 07 )
redefinirusuario;;
8 | 08 )
deletarusuario;;
9 | 09)
monitores;;
10)
backup_de_usuarios;;
11)
restaurar_usuarios;;
12)
detalhes_usuarios;;
13)
deletar_todos;;
14)
limitarshadowsocks;;
15)
renovarusuario;;
16)
droplimit;;
0)
vpspack;;
esac
}
function droplimit(){
echo -e "\033[1;33m Se activaran las limitaciones SSH y Dropbear\033[0m"
echo -e "\033[1;33m Continuar?\033[0m"
while [[ ${yesno} != @(s|S|y|Y|n|N) ]]; do
read -p "[S/N]: " yesno
tput cuu1 && tput dl1
done
if [[ ${yesno} = @(s|S|y|Y) ]]; then
screen -dmS limites bash /etc/VpsPackdir/droplimit.sh
ps -aux | grep SCREEN | grep droplimit.sh | awk '{print $2; }' > /tmp/droplimit.txt
pidlimit=`cat /tmp/droplimit.txt`;
echo -e "\033[1;33m Servicio de limitacion de SSH y Dropbear Iniciado Pid:\033[1;32m $pidlimit \033[0m"
fi
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack
}
function limitarshadowsocks(){
echo "Escribe el puerto Shadowsocks en uso"
read -p ": " shadowpuerto
echo "Escribe el numero de usuarios que quieres limitar Shadowsocks: "
read -p ": " shadowlimit
iptables -A INPUT -p tcp --syn --dport $shadowpuerto -m connlimit --connlimit-above $shadowlimit -j REJECT --reject-with tcp-reset
echo "Se agregó la regla de limite de $shadowlimit en el puerto $shadowpuerto en Shadowsocks"
}
function delpaq(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m       VPSPack $vpspackversion @ DESINSTALADORES \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37mSeleccione una opcion a desinstalar:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m] BADVPN \033[1;33m
[\033[1;32m2\033[1;33m] FAIL2BAN \033[1;33m
[\033[1;32m3\033[1;33m] STUNNEL4 \033[1;33m
[\033[1;32m4\033[1;33m] WEBMIN \033[1;33m
[\033[1;32m5\033[1;33m] PYTHON \033[1;33m
[\033[1;32m6\033[1;33m] SHADOWSOCKS \033[1;33m
[\033[1;32m7\033[1;33m] DROPBEAR \033[1;33m
[\033[1;32m8\033[1;33m] OPENVPN \033[1;33m
[\033[1;32m9\033[1;33m] LIBRERIAS 32BITS \033[1;33m
[\033[1;32m10\033[1;33m] NGINX \033[1;33m
[\033[1;32m11\033[1;33m] SQUID \033[1;33m
[\033[1;32m12\033[1;33m] V2RAY (Original) \033[1;33m
[\033[1;32m13\033[1;33m] V2RAY (Mod) \033[1;33m
[\033[1;32m14\033[1;33m] TROJAN Server \033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
removerbadvpn;;
2)
removerfail2ban;;
3)
removerstunnel;;
4)
removerwebmin;;
5)
removerpython;;
6)
removershadowsocks;;
7)
removerdropbear;;
8)
removeropenvpn;;
9)
removerlibs32;;
10)
removernginx;;
11)
removersquid;;
12)
removerv2ray;;
13)
removerv2raymod;;
14)
removertrojan;;
0)
vpspack;;
esac
}
function removertrojan(){
source <(curl -sL https://git.io/trojan-install) --remove
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31m PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removerv2raymod(){
source <(curl -sL https://git.io/JeSZL) --remove
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31m PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removerv2ray(){
source <(curl -sL https://multi.netlify.com/v2ray.sh) --remove
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31m PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removerbadvpn(){
badvpn stop
killall badvpn-udpgw
rm /bin/badvpn
rm /usr/bin/badvpn-udpgw
clear
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31m PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removerfail2ban(){
apt-get purge fail2ban -y
apt-get remove fail2ban -y
clear
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31mINSTALACION FINALIZADA - PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removerstunnel(){
apt-get purge stunnel4 -y
apt-get remove stunnel4 -y
clear
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31mINSTALACION FINALIZADA - PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removerwebmin(){
apt-get purge webmin -y
apt-get remove webmin -y
clear
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31mINSTALACION FINALIZADA - PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removerpython(){
killall python
pkill python
clear
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31mINSTALACION FINALIZADA - PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removershadowsocks(){
cd /etc/VpsPackdir/
./shadowsocks.sh uninstall
cd /root
clear
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31mINSTALACION FINALIZADA - PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removerdropbear(){
service dropbear stop
apt-get purge dropbear -y
apt-get remove dropbear -y
service dropbear stop
/etc/init.d/dropbear stop
killall dropbear
clear
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31mINSTALACION FINALIZADA - PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removeropenvpn(){
apt-get purge openvpn -y
apt-get remove openvpn -y
clear
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31mINSTALACION FINALIZADA - PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removerlibs32(){
apt-get purge ia32-libs -y
apt-get remove ia32-libs -y
clear
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31mINSTALACION FINALIZADA - PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removernginx(){
apt-get purge nginx -y
apt-get remove nginx -y
clear
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31mINSTALACION FINALIZADA - PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function removersquid(){
apt-get purge squid -y
apt-get remove squid -y
apt-get purge squid3 -y
apt-get remove squid3 -y
clear
echo -e "\033[1;37m  Desinstalacion Completa \033[0m"
echo -e "\033[1;31mINSTALACION FINALIZADA - PRESIONE ENTER\033[0m"
read -p " "
vpspack
}
function config(){
clear
if [[ $1 == "" ]]
then
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m       VPSPack $vpspackversion @ CONFIGURACIONES \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m] SSH                 ›   \033[1;32m$xssh \033[1;33m
[\033[1;32m2\033[1;33m] DROPBEAR            ›   \033[1;32m$xdropbear\033[1;33m
[\033[1;32m3\033[1;33m] STUNNEL4            ›   \033[1;32m$xstunnel \033[1;33m
[\033[1;32m4\033[1;33m] SQUID               ›   \033[1;32m$xsquid \033[1;33m
[\033[1;32m5\033[1;33m] PROXY PYTHON        ›   \033[1;32m$xpython \033[1;33m
[\033[1;32m6\033[1;33m] SHADOWSOCKS         ››  \033[1;33m
[\033[1;32m7\033[1;33m] SOCKS5              ›   \033[1;32m$xsocks5 \033[1;33m
[\033[1;32m8\033[1;33m] SOCKD               ›   \033[1;32m$xsocksd \033[1;33m
[\033[1;32m9\033[1;33m] OPENVPN             ›   \033[1;32m$xopenvpn \033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR                 \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
configssh;;
2)
configdropbear;;
3)
configstunnel;;
4)
configsquid;;
5)
configproxy;;
6)
configshadow;;
7)
configsocks5;;
8)
configsockd;;
9)
configopenvpn;;
0)
vpspack;;
esac
}
function configssh(){
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Configuracion SSH\033[0m"
cat /etc/ssh/sshd_config
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
}
function configdropbear(){
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Configuracion Dropbear\033[0m"
echo -e "\033[1;37m › /etc/default/dropbear\033[0m"
cat /etc/default/dropbear
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
}
function configstunnel(){
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Configuracion Stunnel\033[0m"
echo -e "\033[1;37m › /etc/stunnel/stunnel.conf\033[0m"
cat /etc/stunnel/stunnel.conf
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
}
function configsquid(){
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Configuracion Squid\033[0m"
cat /etc/squid/squid.conf
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
}
function configproxy(){
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Configuracion Proxy Python\033[0m"
echo -e "\033[1;37m › /root/proxy.py\033[0m"
cat /root/proxy.py
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
}
function configsocks5(){
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Configuracion Socks5\033[0m"
echo -e "\033[1;37m › /etc/danted.conf\033[0m"
cat /etc/danted.conf
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
}
function configsockd(){
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Configuracion Sockd\033[0m"
echo -e "\033[1;37m › /home/dante/danted.conf\033[0m"
cat /home/dante/danted.conf
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
}
function configopenvpn(){
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Configuracion Openvpn\033[0m"
echo -e "\033[1;37m › /etc/openvpn/server.conf\033[0m"
cat /etc/openvpn/server.conf
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
}
function configshadow(){
if [[ $1 == "" ]]
then
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Configuracion Shadowsocks\033[0m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m] LIBEV                 ›   \033[1;33m
[\033[1;32m2\033[1;33m] ROCKET                ›   \033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR                 \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
configlibev;;
2)
configrocket;;
0)
vpspack;;
esac
}
function configlibev(){
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Configuracion Shadowsocks Libev\033[0m"
echo -e "\033[1;37m › /etc/shadowsocks-libev/config.json\033[0m"
cat /etc/shadowsocks-libev/config.json
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
}
function configrocket(){
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────=\033[1;33m"
echo -e "\033[1;37m › Configuracion Shadowsocks Rocket\033[0m"
echo -e "\033[1;37m › /etc/shadowsocks-r/config.json\033[0m"
cat /etc/shadowsocks-r/config.json
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
}
function detalhes_usuarios(){
clear
figlet -p -f slant < /root/name
echo -e "\033[1;37m      【     ★ VPSPack v. $vpspackversion ★     】\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Linux Dist:	$distribution › Version: $os_version\033[0m"
echo -e "\033[1;37m › IP VPS:       $ip \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ###############################\033[1;33m"
echo -e "\033[1;32m---------------------------------------------------------------\033[0m"
echo -e "\033[1;37m Usuario        Contraseña               Fecha E.          Logins S. \033[0m"
echo -e "\033[1;32m---------------------------------------------------------------\033[0m"
for users in `awk -F : '$3 > 900 { print $1 }' /etc/passwd |sort |grep -v "nobody" |grep -vi polkitd |grep -vi system-`
do
if cat /etc/VpsPackdir/limite/$users > /dev/null 2> /dev/null
then
limitecs=$(cat /etc/VpsPackdir/limite/$users)
else
limitecs="null"
fi
if  senha=$(cat /etc/VpsPackdir/senha/$users > /dev/null 2> /dev/null)
then
senha=$(cat /etc/VpsPackdir/senha/$users)
else
senha="null"
fi
data=$(chage -l $users |grep -i co |awk -F : '{print $2}')
if [ $data = never ] 2> /dev/null
then
date="Nunca"
fi
detalhesdata=$(printf '%-18s' "$data")
detalheslimit=$(printf '%-10s' "$limitecs")
detalhes=$(printf ' %-21s' "$users")
detalhespass=$(printf '%-18s' "$senha")
echo -e "\033[1;33m$detalhes $detalhespass $detalhesdata $detalheslimit\033[0m"
echo -e "\033[1;32m---------------------------------------------------\033[0m"
done
echo -e " "
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 2
}
function restaurar_usuarios(){
echo -n "Digite la ruta al archivo de respaldo: "
read arq
echo -e "\033[1;37mRestaurando Usuarios...\033[0m"
for user in `cat $arq`
do
usuario=$(echo "$user" |awk -F : '{print $1}')
senha=$(echo "$user" |awk -F : '{print $2}')
if cat /etc/passwd |grep $usuario: 1> /dev/null 2>/dev/null
then
echo " " > /dev/null
else
echo "$user" |cut -d: -f3 1> /dev/null 2>/dev/null
if [ $? = 0 ]
then
limite=$(echo "$user" |awk -F : '{print $3}')
useradd -M -s /bin/false $usuario
(echo $senha ; echo $senha) | passwd $usuario > /dev/null 2> /dev/null
limit $usuario $limite 1> /dev/null 2> /dev/null
echo "$senha" > /etc/VpsPackdir/senha/$usuario
else
useradd -M -s /bin/false $usuario
(echo $senha ; echo $senha) | passwd $usuario > /dev/null 2> /dev/null
echo "$senha" > /etc/VpsPackdir/senha/$usuario
fi
echo -e "\033[1;37mUsuario: \033[1;31m$usuario \033[1;37mBackup: [\033[1;31mOk\033[1;37m]\033[0m"
fi
done
echo -e " "
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack 2
}
function bannermenu(){
if [[ $1 == "" ]]
then
echo -e "[\033[1;31m-\033[1;33m]\033[1;32m ───────────────── /// ─────────────────\033[1;33m"
echo -e "\033[1;37m › Configuracion Shadowsocks\033[0m"
echo -e "\033[1;37mSeleccione una opcion:    Para Salir Ctrl + C\033[1;33m
[\033[1;32m1\033[1;33m] EDITAR  BANNER   ›   \033[1;33m
[\033[1;32m2\033[1;33m] IMPORTAR BANNER  ›   \033[1;33m
[\033[1;32m0\033[1;33m] < REGRESAR                 \033[1;33m"
read -p ": " opcao
else
opcao=$1
fi
case $opcao in
1)
banner;;
2)
bannerimp;;
esac
}
function banner(){
sshd_config_bak=$(cat /etc/ssh/sshd_config |grep -v "Banner")
echo "$sshd_config_bak" > /etc/ssh/sshd_config
echo "Banner /etc/banner" >> /etc/ssh/sshd_config
service ssh restart 1>/dev/null 2>/dev/null
service sshd restart 1>/dev/null 2>/dev/null
if [ -f /etc/banner ]
then
banner=$(cat /etc/banner)
else
banner="No hay banner de momento"
fi
echo -e "\033[1;32mBanner actual\n\n\033[1;37m$banner\n\033[0m"
echo "Escriba su banner (ctrl + c para sair )"
read -p ": " bannerssh
echo "$bannerssh" > /etc/banner
echo "Banner Modificado para OpenSSH"
service ssh restart 1> /dev/null 2>/dev/null
service sshd restart 1>/dev/null 2>/dev/null
}
function bannerimp(){
echo -e "A continuacion se importara un banner"
echo -e "Escribe la url donde se encuentra el archivo de su banner"
echo -e "Si el banner es muy grande, puede que no funcione en dropbear"
echo -r "Ejemplo: http://google.com/banner"
read -p ": " bannerx
curl -o /etc/banner $bannerx
echo -e "Su nuevo banner es:"
cat /etc/banner
service ssh restart
service dropbear restart
echo -e " "
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack
}
function deletar_todos(){
for user in $(cat /etc/passwd |awk -F : '$3 > 900 {print $1}' |grep -v "ubuntu" |grep -vi "nobody")
do
userpid=$(ps -u $user |awk {'print $1'})
kill "$userpid" 2>/dev/null
userdel $user
echo "$user Borrado"
done
}
function speedtestmod(){
cd /root
echo ""
echo -e "   \033[1;32mPROBANDO LA VELOCIDAD DEL SERVIDOR ...\033[0m"
speedtest --share > speed
echo ""
echo -e "   \033[1;34mRESULTADO: \033[0m"
png=$(cat speed | sed -n '5 p' |awk -F : {'print $NF'})
down=$(cat speed | sed -n '7 p' |awk -F :  {'print $NF'})
upl=$(cat speed | sed -n '9 p' |awk -F :  {'print $NF'})
lnk=$(cat speed | sed -n '10 p' |awk {'print $NF'})
echo -e "\033[0;34m━━━━━━━━━━━━━━━━━━━━━━━ /// ━━━━━━━━━━━━━━━━━━━━━━\033[0m"
echo -e "\033[1;32mPING (LATENCIA):\033[1;37m$png"
echo -e "\033[1;32mDOWNLOAD:\033[1;37m$down"
echo -e "\033[1;32mUPLOAD:\033[1;37m$upl"
echo -e "\033[1;32mLINK: \033[1;37m$lnk\033[0m"
echo -e "\033[0;34m━━━━━━━━━━━━━━━━━━━━━━━ /// ━━━━━━━━━━━━━━━━━━━━━━\033[0m"
rm -rf /root/speed
echo -e " "
echo -e "\033[1;31mPRESIONE ENTER PARA CONTINUAR\033[0m"
read -p " "
vpspack
}
function instextras(){
clear
instaladores
}
clear
if [[ $1 == "" ]]
then
clear
figlet -p -f smslant < /root/name
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ──────────────────\033[1;33m"
echo -e "\033[1;37m 【     ☬ VPSPack v.\033[1;32m $vpspackversion ☬     \033[1;37m】\033[0m"
echo -e "\033[1;37m › Linux Dist:\033[1;32m $distribution \033[0m"
echo -e "\033[1;37m › IP Publica VPS:\033[1;32m$ip \033[0m"
echo -e "\033[1;37m › Hostname VPS:\033[1;32m$host \033[0m"
echo -e "\033[1;37m › M: $memoriatotal MB ›Uso: $memoriauso MB ›Libre:\033[1;32m $memorialibre MB\033[0m"
echo -e "\033[1;37m › P:\033[1;32m $processor\033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ──────────────────\033[1;33m"
echo -e "\033[1;37m › Usuarios En Linea: \033[1;32m$_onlin \033[1;37m› Cuentas: \033[1;32m$_tuser \033[0m"
echo -e "[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ──────────────────\033[1;33m"
echo -e "[\033[1;32m1\033[1;33m]   \033[1;31m› \033[1;33mSQUID\033[1;33m            [\033[1;32m2\033[1;33m]   \033[1;31m› \033[1;33mUSUARIOS\033[1;33m
[\033[1;32m3\033[1;33m]   \033[1;31m› \033[1;33mBANNER\033[1;33m           [\033[1;32m4\033[1;33m]   \033[1;31m› \033[1;33mSPEEDTEST\033[1;33m
[\033[1;32m5\033[1;33m]   \033[1;31m› \033[1;33mSISTEMA\033[1;33m          [\033[1;32m6\033[1;33m]   \033[1;31m› \033[1;33mFIREWALL ON \033[1;32m$xiptables \033[1;33m
[\033[1;32m7\033[1;33m]   \033[1;31m› \033[1;33mFIREWALL OFF\033[1;33m     [\033[1;32m8\033[1;33m]   \033[1;31m› \033[1;33mTCP/UDP EN USO\033[1;33m
[\033[1;32m9\033[1;33m]   \033[1;31m› \033[1;33mHERRAMIENTAS\033[1;33m     [\033[1;32m10\033[1;33m]  \033[1;31m› \033[1;33mINSTALADORES\033[1;33m
[\033[1;32m11\033[1;33m]  \033[1;31m› \033[1;33mDESINSTALADORES\033[1;33m  [\033[1;32m12\033[1;33m]  \033[1;31m› \033[1;33mMODIFICAR PUERTOS\033[1;33m
[\033[1;32m13\033[1;33m]  \033[1;31m› \033[1;33mCONFIGS\033[1;33m          [\033[1;32m14\033[1;33m]  \033[1;31m› \033[1;33mSERVICIOS ON/OFF\033[1;33m
[\033[1;32m100\033[1;33m] \033[1;31m› \033[1;33mDESINSTALAR\033[1;33m      [\033[1;32m0\033[1;33m]   \033[1;31m› \033[1;33mSALIR\033[1;33m
[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ──────────────────\033[1;33m
[\033[1;31m-\033[1;33m]\033[1;31m ─── // ─── SERVICIOS ─── \033[1;32mON \033[1;31m─── // ────\033[1;33m
[\033[1;32m-\033[1;33m]   → SSH: \033[1;32m$sshports\033[1;33m→ Dropbear: \033[1;32m$dropbearports \033[1;33m
[\033[1;32m-\033[1;33m]   → Squid: \033[1;32m$squidports \033[1;33m
[\033[1;32m-\033[1;33m]   → SSL: \033[1;32m$sslports \033[1;33m
[\033[1;32m-\033[1;33m]   Δ Shadowsocks Δ \033[1;33m
[\033[1;32m-\033[1;33m]   → Obfs: \033[1;32m$obfsports \033[1;33m| Rocket: \033[1;32m$shadowrports \033[1;33m| Cloack: \033[1;32m$cloakports \033[1;33m
[\033[1;32m-\033[1;33m]   Δ Socks5 Δ \033[1;33m
[\033[1;32m-\033[1;33m]   → Danted:\033[1;32m$dantedports \033[1;33m| Sockd:\033[1;32m$sockdports \033[1;33m| Micro:\033[1;32m$microports\033[1;33m
[\033[1;32m-\033[1;33m]   → OpenVPN:\033[1;32m$openvpnports \033[1;33m
[\033[1;32m-\033[1;33m]   → V2ray:\033[1;32m$v2rayports \033[1;33m
[\033[1;31m-\033[1;33m]\033[1;31m ── // ── SERVICIOS EXTRAS - \033[1;32mON \033[1;31m── // ──\033[1;33m
[\033[1;32m-\033[1;33m]   → UDPWG: \033[1;91m$badvpnports \033[1;33m
[\033[1;32m-\033[1;33m]   → MultiPort: \033[1;32m$xmulti \033[1;33m→ Iodine DNS: \033[1;32m$xiodine \033[1;33m
[\033[1;32m-\033[1;33m]   → Apache: \033[1;91m$apacheports\033[1;33m→ Nginx: \033[1;91m$nginxports \033[1;33m
[\033[1;32m-\033[1;33m]   → Python: \033[1;91m$pythonports \033[1;33m
[\033[1;32m-\033[1;33m]   → Psiphon: \033[1;91m$psiports \033[1;33m
[\033[1;32m-\033[1;33m]   → Trojan: \033[1;91m$trojanports \033[1;33m→ Clash Server:\033[1;32m $xclash \033[1;33m
[\033[1;31m-\033[1;33m]\033[1;31m ───────────────── /// ──────────────────\033[1;33m"
echo -e "\033[1;33m      Δ ESCRIBA UNA OPCION:      \033[0m"
read -p " : " opcao
tput cuu1 >&2 && tput dl1 >&2
else
opcao=$1
fi
case $opcao in
1 | 01 )
configurarsquid;;
2 | 02 )
gestionusuarios;;
3 | 03)
bannermenu;;
4 | 04)
speedtestmod;;
5 | 05)
sistemadetalhes;;
6 | 06)
firewallblock;;
7 | 07)
resetfirewall;;
8 | 08)
puertos;;
9 | 09)
herramientas;;
10)
instextras;;
11)
delpaq;;
12)
addport;;
13)
config;;
14)
administradorprocesos;;
root)
chgroot;;
reboot)
rebootvps;;
usuario)
crearusuario;;
puertosvps)
puertosvps;;
100)
rm -rf /bin/speedtest.py 2>/dev/null
rm -rf /bin/deletarusuario 2>/dev/null
rm -rf /bin/redefinirusuario 2>/dev/null
rm -rf /bin/limite 2>/dev/null
rm -rf /bin/criarusuario 2>/dev/null
rm -rf /bin/vpspack 2>/dev/null;;
0)
exit;;
*)
vpspack;;
esac
